<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{&SITE_TITLE}</title>
    <link href="__PUBLIC__/admin/css/layout.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../Public/Js/jquery-1.2.6.js" ></script>

	<script type="text/javascript">
        $( document ).ready( function(){
              $( "#smiletype option[value='{$smiletype}']" ).attr( 'selected',true );
            })


		var ctrl = function(name){
			this.elements = document.getElementsByName('id[]');
			this.length = this.elements.length;
		}

		ctrl.prototype = {
			reverse:function(){
				for(i=0;i<this.length;i++){
					this.elements[i].checked= !this.elements[i].checked;
				}
			},
			all:function(){
				for(i=0;i<this.length;i++){
					this.elements[i].checked = true;
				}
			},
			unAll:function(){
				for(i=0;i<this.length;i++){
					this.elements[i].checked = false;
				}
			},
			toggle:function(obj){
				this[obj.checked ? 'all' : 'unAll']();
			},
			del:function(id){
				if(id==undefined){
					id = [];
					for(i=0;i<this.length;i++){
						this.elements[i].checked && id.push(this.elements[i].value);
					}
					id = id.join(',');
				}
                alert( id );
 
		var c = null;
</script>
        
  </head>
  <body>
      <div id="container">
                        <div class="tab">
                                <ul>
                                    <li> <a  href="__URL__/index/">Bug列表</a></li>
                                    <li><a href="__URL__/category/">类型管理</a></li>
                                    <li><a class="on" href="__URL__/edition/">版本管理</a></li>
                                </ul>
                        </div>






		<form action="__APP__/Admin/doedition" method="POST">
		<input type="hidden" name="type" value="add">
        <table class="tableborder" width="100%">
          <tbody>
            <tr class="top">
              <td class="border" colspan="2"></td>
            </tr>
            <tr>
              <th class="header" colspan="2">版本管理</th>
            </tr>
            <tr class="label">
              <th>说明</th>
              <th>设置</th>
            </tr>

            <tr class="cell">
              <td class="altbg1">
                <b>新版本</b>
                <br/>
                <span class="smalltxt">添加版本</span>
              </td>
              <td class="altbg2"><input name="title" class="txt" value ="" /></td>
            </tr>
            <tr>
              <td class="footer" colspan="2">
                <input type="submit" class="button" value="提交" />
              </td>
            </tr>
          </tbody>
        </table>
        </form>



        <form action="__URL__/doedition/" method="post">
        <input type="hidden" name="type" value="update" />
          <table class="tableborder" width="100%">
            <tbody>
              <tr class="top">
                <td class="border" colspan="6"></td>
              </tr>
              <tr>
                <th class="header" colspan="6">分类管理</th>
              </tr>
              <tr class="label">
                <th>ID</th>
                <th>分类名</th>
                <th>操作</th>
              </tr>
             <volist id="vo" name="list">
              <tr class="cell altbg1">
                <td>{$vo.id}</td>
                <td ><input type='input' name="title[{$vo.id}]" class="txt" value="{$vo.title}" /></td>
                <td><button type="button" onclick="location.href='__APP__/Admin/doedition/type/del/id/{$vo.id}'">删除</button></td>
              </tr>
              </volist>
              <tr id = "category">
                <td class="footer" colspan="6">
                  <button type="submit" >提交</button>
                </td>
              </tr>
              <tr class="bottom">
                <td class="border" colspan="6">&nbsp;</td>
              </tr>
            </tbody>
          </table>
    <script type="text/javascript">
      c = new ctrl('id[]');
      $( "#allorder option[@value='{$allorder}']" ).attr( 'selected','selected' );
    </script>

        </form>
      </div>
    </body>
</html>
